package com.system.blogAdmin.bundary.dao.impl;

import com.cnc.common.persistence.dao.BaseDaoImpl;
import com.system.blogAdmin.bundary.entity.MainIndex;
import com.system.blogAdmin.bundary.dao.MainIndexDao;

import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @创建时间:  2017-7-5 17:41:32
 * @版本: 1.0
 */
@Repository("mainIndexDao")
public class MainIndexDaoImpl extends BaseDaoImpl<MainIndex> implements MainIndexDao {

    public MainIndex getMaxInfo(){
        Map<String , Object> map = new HashMap<String , Object>();
        List<MainIndex> mainIndexList = super.listBy(map,"getMaxInfos");
        if(mainIndexList.size()>0){
            return mainIndexList.get(0);
        }
        return null;
    }
}
